import QtQuick 2.0

ListView {
      model: ModelIn{}
      //delegate:DelegateIn{}
      delegate: Component {
          id: redSquare

          //height: 10
          Row{
              property bool expanded: false
              id:mainRow
              visible: isvisible
              spacing: 25*lv-5

              Image{
                  id:expander
                  source: "qrc:/expander.png"
                  rotation: mainRow.expanded ? 90 : 0
                  opacity: rgVal - lfVal === 1 ? 0 : 1  //透明度
                  Behavior on rotation {
                      NumberAnimation {duration: 110}
                  }
                  MouseArea {
                      visible: expander.opacity === 1 ? true : false
                      id: expanderMouseArea
                      anchors.fill: parent
                      onClicked: {
                          mainRow.expanded = !mainRow.expanded
                          Function setIsvisible(t){
                              for(item in model){
                                  if(item.)
                              }
                          }

                          //console.log(container.height)
                      }
                  }
              }
              Text {
                  visible: rgVal - lfVal === 1 ? 1 : 0
                  //anchors.left: expander.right
                  text: sid + ": " + value
                  color: "red"
              }
              Text {
                  //anchors.left: expander.right
                  visible: rgVal - lfVal === 1 ? 0 : 1
                  text: sid + ": " + value
                  color: "blue"
              }
          }
      }

  }
